package TenBasicAlgorithm;

import java.util.Arrays;

//普利姆算法（修路问题）(最小生成树)//太麻烦暂时未实现
public class PrimDemo {
    public static void main(String[] args) {
        char[]data={'A','B','C','D','E','F','G'};
        int verxs=data.length;

    }
}
class MinTree{
    public void creatGraph(MGraph graph,int verxs,char[] data,int[][]weight){
        for (int i = 0; i < verxs; i++) {
            graph.data[i]=data[i];
            for (int j = 0; j < verxs; j++) {
                graph.weight[i][j]=weight[i][j];
            }
        }
    }
    public void showGraph(MGraph graph){
        for(int[] link:graph.weight){
            System.out.println(Arrays.toString(link));
        }
    }
}
class MGraph{
    int verxs;
    char[] data;
    int[][]weight;

    public MGraph(int verxs) {
        this.verxs = verxs;
        data=new char[verxs];
        weight=new int[verxs][verxs];
    }
}